package org.apache.ibatis.demo.clazz;

import java.lang.reflect.Constructor;

/**
 * 反射测试类
 *
 * @author zhaohui
 * @date 2019/11/18 14:00
 */
public class ClassTest {

    public static void main(String[] args) throws Exception {
        Class clazz = User.class;
        Constructor[] constructors = clazz.getDeclaredConstructors();
        for (Constructor constructor : constructors) {
            System.out.println(constructor);
        }
        System.out.println("===========================");
        Constructor constructor = clazz.getDeclaredConstructor(String.class, int.class, boolean.class);
        System.out.println(constructor);
    }

}
